package edu.zut.pojo;

import java.util.List;

public class Page {

    private Integer pageNum; //总页数
    private Integer currentPage; //当前页
    private Integer pageSize; //每页多少条数据
    private Integer size; //总条数
    //分页数据
    private List<Employee> list;

    public Integer getPageNum() {
        if (size % pageSize == 0){
            pageNum = size / pageSize;
        }else {
            pageNum = size / pageSize + 1;
        }
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public Integer getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(Integer currentPage) {
        this.currentPage = currentPage;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getSize() {
        return size;
    }

    public void setSize(Integer size) {
        this.size = size;
    }

    public List<Employee> getList() {
        return list;
    }

    public void setList(List<Employee> list) {
        this.list = list;
    }
}
